{% extends "PHPDishAdminBundle::layout.html.twig" %}

{% block body %}
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">文章</h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <div id="example2_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
                        <div class="row">
                            <div class="col-sm-6"></div>
                            <div class="col-sm-6"></div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12">
                                <table id="example2" class="table table-bordered table-hover dataTable" role="grid" aria-describedby="example2_info">
                                    <thead>
                                        <tr role="row">
                                            <th rowspan="1" colspan="1">标题</th>
                                            <th rowspan="1" colspan="1">作者</th>
                                            <th rowspan="1" colspan="1">所属专栏</th>
                                            <th rowspan="1" colspan="1">发布时间</th>
                                            <th rowspan="1" colspan="1">最后修改时间</th>
                                            <th rowspan="1" colspan="1">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    {% for post in pagination %}
                                    <tr role="row" class="odd">
                                        <td>{{ post.title }}</td>
                                        <td>{{ post.author.username }}</td>
                                        <td>{#post.blog.name #}</td>
                                        <td>{{ post.createdAt|date('Y-m-d H:i:s') }}</td>
                                        <td>{{ post.updatedAt|date('Y-m-d H:i:s') }}</td>
                                        <td>查看</td>
                                    </tr>
                                    {% endfor %}
                                    </tbody>
                                    <tfoot>
                                        <tr>
                                            <th rowspan="1" colspan="1">标题</th>
                                            <th rowspan="1" colspan="1">作者</th>
                                            <th rowspan="1" colspan="1">所属专栏</th>
                                            <th rowspan="1" colspan="1">发布时间</th>
                                            <th rowspan="1" colspan="1">最后修改时间</th>
                                            <th rowspan="1" colspan="1">操作</th>
                                        </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="dataTables_paginate paging_simple_numbers" id="example2_paginate">
                                    {{ knp_pagination_render(pagination) }}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box-body -->
            </div>
        </div>
    </div>
</section>
{% endblock %}